<?php

	class Mod_user extends CI_Model{

		function __construct()
		{
			parent::__construct();
		}


		function check_login($mail, $pass)
		{
			$sha1_pass = sha1($pass);

			$this->db->where('u_email',$mail);
			$this->db->where('u_pass',$sha1_pass);
			$result = $this->db->get('utilizador');

			if($result->num_rows() == 1)
				return $result->result();
			else
				return false;
		}

	}

?>